<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="wrap">
        <button id ="btn">提交</button>
    </div>

    <script>
        let wrap = document.getElementById('wrap');
        let btn = document.getElementById('btn');
        //点那个按钮就记录下来，再去禁用它
        const disabledElements = new WeakSet()
        disabledElements.add(btn)

        btn.addEventListener('click', () => {
            wrap.removeChild(btn)
        })
    </script>
</body>
</html>